//
//  SystemInfo.h
//  MSJD
//
//  Created by xiangbo on 2018/9/16.
//  Copyright © 2018 xiangbo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface SystemInfo : NSObject

#define MS_IS_IOS7ORLATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7)
//是否是iOS8以上
#define MS_IS_IOS8ORLATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8)
//是否是iOS9以上
#define MS_IS_IOS9ORLATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9)
//是否是iOS11以上
#define MS_IS_IOS11ORLATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11)
//SDK版本号
#define MS_SDK_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]
#define MS_SDK_VERSION_STRING [[UIDevice currentDevice] systemVersion]

//应用版本号
#define MS_APP_VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
//应用版本号
#define MS_APP_VERSION_BUILD [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]

//应用名
#define MS_APP_BUNDLE_NAME [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]

//应用显示名
#define MS_APP_BUNDLE_DISPLAT_NAME [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"]

//设备类型（iPad iPhone）
#define MS_DEVICE_TYPE [UIDevice currentDevice].model
//设备名称
#define MS_DEVICE_NAME [UIDevice currentDevice].name
//屏幕宽度
#define MS_SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
//屏幕高度
#define MS_SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
/** 状态栏高度 */
#define MS_STATUS_HEIGHT [[UIApplication sharedApplication] statusBarFrame].size.height

#define MS_MAX_SCREEN_WIDTH MAX([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)
#define MS_MIN_SCREEN_HEIGHT MIN([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)

#define MS_IS_IPHONEX ((MS_MAX_SCREEN_WIDTH>=812)?YES:NO)

#define MS_NAVIGATION_HEIGHT (MS_IS_IPHONEX ? 88 : 64)

#define MS_TABBAR_HEIGHT (MS_IS_IPHONEX ? 83 : 49)

@end

NS_ASSUME_NONNULL_END
